import 'package:flutter/material.dart';
class Item extends StatelessWidget {

  final String? tile;
  final bool? isActive;
  final Function(BuildContext context)? onTap;


  Item({this.tile, this.isActive, this.onTap});

  @override
  Widget build(BuildContext context) {
   var color=isActive! ?Colors.grey : Colors.black;
    return GestureDetector(
      onTap: (){
        if(onTap!=null){
          onTap!(context);
        }
      },
      child: Container(
        child: Row(
          children: [
            Text(tile!,style: TextStyle(color: color),),
            Icon(Icons.arrow_drop_down,size: 20,color: color,)
          ],
        ),
      ),
    );
  }
}
